/* GUI CONVERTED from rsrsdup.p (converter v1.75) Sat Aug 12 23:15:51 2000 */
/* rsrsdup.p - Release Management Supplier Schedules                    */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*F0PN*/ /*V8:ConvertMode=Maintenance                                   */
/*K1Q4*/ /*V8:WebEnabled=No                                             */
/* REVISION: 7.3    LAST MODIFIED: 04/25/94           BY: WUG *GJ59*    */
/* REVISION: 7.3    LAST MODIFIED: 04/11/95           BY: ame *F0QB*    */
/* REVISION: 7.3    LAST MODIFIED: 01/02/96           BY: kjm *G1HR*    */
/* REVISION: 8.6    LAST MODIFIED: 05/20/98           BY: *K1Q4* Alfred Tan */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00           BY: *N0KP* myb        */


      /* UPDATE REMOTE DATABASE PO MASTER/DETAIL RECORD */

/*F0QB*/  {mfdeclre.i}
      define input parameter pod_recid as recid.

      define new shared frame hf_po_mstr.
      define new shared frame hf_pod_det.
      define stream nullstream.
      define variable old_db as character.

/*F0QB*   {mfdeclre.i}*/
/*F0QB*/  define variable sdb_err as integer no-undo.

/*G1HR*/  FORM /*GUI*/ 
/*G1HR*/     po_sch_mthd format "x(3)"
/*G1HR*/  with frame hf_po_mstr width 80 THREE-D /*GUI*/.


      FORM /*GUI*/ 
         po_mstr
/*G1HR*   with frame hf_po_mstr. */
/*G1HR*/  with frame hf_po_mstr width 80 THREE-D /*GUI*/.


      FORM /*GUI*/ 
         pod_det
/*G1HR*   with frame hf_pod_det.  */
/*G1HR*/  with frame hf_pod_det width 80 THREE-D /*GUI*/.


      find pod_det where recid(pod_det) = pod_recid no-lock.
      find po_mstr where po_nbr = pod_nbr no-lock.
      find si_mstr where si_site = pod_site no-lock.

      if si_db <> global_db then do:
         {mfoutnul.i &stream_name=nullstream}

         do with frame hf_po_mstr:
        display stream nullstream po_mstr with frame hf_po_mstr.
         end.

         do with frame hf_pod_det:
        display stream nullstream pod_det with frame hf_pod_det.
         end.

         output stream nullstream close.

         old_db = global_db.
/*F0QB*      create alias qaddb for database value(si_db).*/
/*F0QB*      global_db = si_db.*/
/*F0QB*/     {gprun.i ""gpalias3.p"" "(input si_db, output sdb_err)"}
/*GUI*/ if global-beam-me-up then undo, leave.


         {gprun.i ""rsrsdupa.p""}
/*GUI*/ if global-beam-me-up then undo, leave.

/*F0QB*      create alias qaddb for database value(old_db).*/
/*F0QB*      global_db = old_db.*/
/*F0QB*/     {gprun.i ""gpalias3.p"" "(input old_db, output sdb_err)"}
/*GUI*/ if global-beam-me-up then undo, leave.

      end.
